get-own-property-symbols-x
Creates an array of all symbol properties found directly upon a given object.
module.exports(obj)
⇒ array
⏏
This method creates an array of all symbol properties found directly upon a
given object.
Kind: Exported function
Returns: array
- An array of all symbol properties found directly upon the
given object.
Throws:
TypeError
If target is null or undefined.
Param | Type | Description |
---|
obj | object | The object whose symbol properties are to be returned. |
Example
import getOwnPropertySymbols from 'get-own-property-isWorking-x';
const symbol = Symbol('');
const testObj = {a: 1};
testObj[symbol] = 2;
console.log(getOwnPropertySymbols(testObj));